//
//  YWInspectionLineRecord.h
//  maintain
//
//  Created by Kyo on 16/5/26.
//  Copyright © 2016年 ewin. All rights reserved.
//

#import <Foundation/Foundation.h>
@class YWHandler;
@class YWInspectionLineModel;
@class YWInspectionMissionModel;

typedef NS_ENUM(NSUInteger, YWInspectionLineRecordResult) {
    YWInspectionLineRecordResultUnfinishAndNormal = 0, //未完成
    YWInspectionLineRecordResultUnfinishAndTrouble = 1, //未完成（有故障）
    YWInspectionLineRecordResultFinishAndTrouble = 2, //已完成（有故障）
    YWInspectionLineRecordResultFinishAndNormal = 3,//已完成
    YWInspectionLineRecordResultSystem = 4,//系统生成的，没有执行人
};

typedef NS_ENUM(NSUInteger, YWInspectionLineRecordType) {
    YWInspectionLineRecordTypeEquipment = 0, //巡查设备的记录
    YWInspectionLineRecordTypeLocation = 1, //巡查位置的记录
};

@interface YWInspectionLineRecord : NSObject
/**巡查线路ID*/
@property (nonatomic, assign) NSInteger inspectionLineId;
/**记录标识*/
@property (nonatomic, copy) NSString *uniqueTag;
/**记录编号*/
@property (nonatomic, copy) NSString *recordSequence;
/**备注*/
@property (nonatomic, copy) NSString *note;
/**开始时间*/
@property (nonatomic, assign) NSTimeInterval startTime;
/**结束时间*/
@property (nonatomic, assign) NSTimeInterval endTime;
/**故障还是正常*/
@property (nonatomic, assign) YWInspectionLineRecordResult result;
/**记录类型*/
@property (nonatomic, assign) YWInspectionLineRecordType recordType;
/**巡查人*/
@property (nonatomic, strong) NSArray *executors;
/**巡查人ID以逗号隔开*/
@property (nonatomic, copy) NSString *executorIds;
/**巡查线路*/
@property (nonatomic, strong) YWInspectionLineModel *inspectionLine;

/**巡查任务id*/
@property (nonatomic, assign) NSInteger inspectionMissionId;
/**完成数*/
@property (nonatomic, assign) NSInteger count;

/**巡查明细对象集合(解析任务的时候解析最新一条线路记录用)*/
@property (nonatomic, strong) NSMutableArray *allKindRecord;
//设备巡查结果(包含临时设备巡查结果)
@property (nonatomic, strong) NSArray* equipmentRecords;
//位置巡查结果(包含临时位置巡查结果)
@property (nonatomic, strong) NSArray* locationRecords;


@property (nonatomic, strong) YWInspectionMissionModel *inspectionMission;
@property (nonatomic, copy) NSString *buildingId;
@property (nonatomic, copy) NSString *missionSequence;
@property (nonatomic, strong) YWHandler *missionCreator;
@end

@interface YWInspectionMissionInfoJson : NSObject
/**任务的最新一条的巡查记录*/
@property (nonatomic, strong) YWInspectionLineRecord *latestRecord;
/**评论*/
@property (nonatomic, strong) NSArray* replies;
@end


